package oo.shootgame;
import java.awt.image.BufferedImage;
public class BigPlane extends Plane implements Emeny,Award{
	private int AwardType;
	protected BufferedImage[] images;
	private int index;
	private int speed;
	public BigPlane(){
		image=ShootGame.bigplane0;
		width=image.getWidth()-20;
		height=image.getHeight()-20;
		x=(int)(Math.random()*(ShootGame.WIDTH-width));
		y=-height;
		life=10;
		AwardType=(int)(Math.random()*2);
		images=new BufferedImage[]{ShootGame.bigplane0,ShootGame.bigplane1};
		index=0;
		speed=1;
	}
	public int getScore(){
		return 100;
	}
	public int getType(){
		return AwardType;
	}
	public void step(){
		index++;
		if(index%50==0){
			image=images[0];
		}
		y+=speed;
	}
	public Bullet[] bigshoot(){
		Bullet[] bp=new Bullet[2];
		bp[0]=new Bullet(x,y+height/2+10);
		bp[1]=new Bullet(x+width,y+height/2+10);
		return bp;
	}
	public void lifedown(){
		this.life--;
	}

}
